import { RouteRecordRaw } from 'vue-router'
export const Layout = () => import('@/layout/index.vue')

export const groundRoutes: RouteRecordRaw[] = [
  {
    path: '/ground',
    component: Layout,
    redirect: '/ground/groundBook',
    meta: { title: '场地预订', icon: '' },
    children: [
      {
        path: 'groundBook',
        component: () => import('@/views/ground/groundBook.vue'),
        name: 'GroundBook',
        meta: {
          title: '预订',
          icon: '',
          affix: false,
          keepAlive: true,
        },
      },
      {
        path: 'groundProjectList',
        component: () => import('@/views/ground/groundProjectList.vue'),
        name: 'GroundProjectList',
        meta: {
          title: '项目列表',
          icon: '',
          affix: false,
          keepAlive: true,
        },
      },
      {
        path: 'groundProjectCreateUpdate',
        component: () => import('@/views/ground/groundProjectCreateUpdate.vue'),
        name: 'GroundProjectCreateUpdate',
        meta: {
          title: '项目添加/编辑',
          icon: '',
          affix: false,
          keepAlive: true,
          hidden: true,
          activeMenu: 'GroundProjectList'
        },
      },
      {
        path: 'groudProjectHome',
        component: () => import('@/views/ground/groudProjectHome.vue'),
        name: 'GroudProjectHome',
        meta: {
          title: '项目主页',
          icon: '',
          affix: false,
          keepAlive: true,
          hidden: true,
          activeMenu: 'GroundProjectList'
        },
      },
      {
        path: 'bookBillingRules',
        component: () => import('@/views/ground/bookBillingRules.vue'),
        name: 'BookBillingRules',
        meta: {
          title: '计费规则',
          icon: '',
          affix: false,
          keepAlive: true,
        },
      },
    ],
  },
]
